home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mc51bugs
/
q32479
< prev
next >
Wrap
Text File
|
1988-07-20
|
1KB
|
52 lines
Q32479 Incorrect Code Generated for Nested Intrinsics
C Compiler
5.10 | 5.10
MS-DOS | OS/2
Summary:
The code generated for the following example is incorrect when it
is compiled with the options /AL /Oil. The DS register is not restored
after the call to strcpy, which causes subsequent data accesses within
the loop to be incorrect.
Microsoft has confirmed this to be a problem in Version 5.10
of the C compiler. We are researching this problem and will post new
information as it becomes available.
You can work around this problem by declaring the variable L to be
int rather than register.
More Information:
The following is an example:
#include <stdio.h>
struct billrec
{
char invoicebody[20][52];
} ;
struct billrec invoice;
int column;
static char textbody[20][80];
void edit_text( )
{
register int i;
register int L;
for ( i = 0; i < 20; i++ )
{
memset(textbody[i], NULL, 80);
if ( strlen(invoice.invoicebody[i]) )
strcpy(textbody[i], invoice.invoicebody[i]);
}
column = L + 11 + 1;
}
Keywords: buglist5.10 qfbv
Updated 88/07/21 03:19